package com.king.designpatterns.创造型模式.原型模式;

import java.util.Map;

/**
 * @author king
 * @date 2021-06-07 17:49
 */
public class Mail implements Cloneable{
    /**
     * 收件人
     */
    private String receiver;
    /**
     * 标题
     */
    private String subject;
    /**
     * 称谓
     */
    private String appellation;
    /**
     * 内容
     */
    private String context;
    /**
     * 结尾
     */
    private String tail;

    /**
     * 构造方法
     * @param subject 标题
     * @param context 内容
     */
    public Mail(String subject, String context) {
        this.subject = subject;
        this.context = context;
    }

    /**
     * 克隆方法
     * @return Mail
     */
    @Override
    public Mail clone() {
        Mail mail = null;
        try {
            mail = (Mail) super.clone();
        } catch (CloneNotSupportedException e) {
            e.printStackTrace();
        }
        return mail;
    }

    public String getReceiver() {
        return receiver;
    }

    public void setReceiver(String receiver) {
        this.receiver = receiver;
    }

    public String getSubject() {
        return subject;
    }

    public void setSubject(String subject) {
        this.subject = subject;
    }

    public String getAppellation() {
        return appellation;
    }

    public void setAppellation(String appellation) {
        this.appellation = appellation;
    }

    public String getContext() {
        return context;
    }

    public void setContext(String context) {
        this.context = context;
    }

    public String getTail() {
        return tail;
    }

    public void setTail(String tail) {
        this.tail = tail;
    }
}
